import {
  Controller,
  Get,
  Query,
  Post,
  Body,
  Put,
  Param,
  Delete,
  Bind,
} from '@nestjs/common';
import { MasterService } from './master.service';
import { CreateMasterDto } from './dto/create-master.dto';
import { ValidationPipe } from './validation.pipe';

@Controller('master')
export class MasterController {
  constructor(private masterService: MasterService) {}
  @Post('add')
  @Bind(Body(new ValidationPipe()))
  create(createMasterDto: CreateMasterDto) {
    return this.masterService.create(createMasterDto);
  }
  @Put('catsOwner')
  updataCatMaster(@Body() updateObj) {
    return this.masterService.updataCatMaster(updateObj);
  }
  @Get()
  findAll() {
    return this.masterService.findAll();
  }
}
